<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="http://youdian.asedrfa.top/js/jquery-3.6.0.js"></script>

</head>

<body>
    <button id="bt">搜索</button>

</body>
<script>
    $(window).ready(function() {
        console.log(1)
        $('#bt').click(function() {
            console.log(1)
            $.ajax({
                type: "POST",
                dataType: "json",
                url: "http://www.songe.cc",
                data: {
                    input: "呼吸决定",
                    filter: "name",
                    type: "netease",
                    page: 1
                },
                beforeSend: function(XMLHttpRequest) {
                    XMLHttpRequest.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
                    XMLHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
                },
                success: function(res) {
                    console.log(res)
                }

            })


            // $.post("http://www.songe.cc", JSON = {
            //         input: "呼吸决定",
            //         filter: "name",
            //         type: "netease",
            //         page: 1
            //     },
            //     dataType = "json",
            //     headers = {
            //         'X-Requested-With': 'XMLHttpRequest'
            //     },
            //     function(resoult) {
            //         if (resoult.code == 200) {
            //             console.log(resoult)
            //         }
            //     });
        });
    });
</script>

</html>